package driver;

import java.util.ArrayList;

import vo.ChooseCourseVO;
import vo.CourseVO;
import vo.StudentVO;
import businesslogicservice.ChooseCourseBLService;
import businesslogicservice.ResultMessage;

public class ChooseCourseBlService_Driver {
	public void driver(ChooseCourseBLService chooseCourseBLService){
		ChooseCourseVO chooseCourseVO=chooseCourseBLService.getChooseCourseRecord(12345);
		if (chooseCourseVO!=null) {
			System.out.println("Get choose course record success!");
		}
		
		ArrayList<StudentVO> studentVOs=chooseCourseBLService.getStuList(new CourseVO());
		if (studentVOs!=null) {
			System.out.println("Get student list success!");
		}
		ArrayList<ChooseCourseVO> courseVOs=chooseCourseBLService.getAllChooseCourseRecord();
		if (courseVOs!=null) {
			System.out.println("Get choose course list success!");
		}
		
		ResultMessage resultMessage=chooseCourseBLService.chooseACourse(new CourseVO(), new StudentVO());
		if (resultMessage==ResultMessage.EXIST) {
			System.out.println("Get choose course list success!");
		}
		
		ResultMessage resultMessage2=chooseCourseBLService.deleteAChooseCourse(new ChooseCourseVO());
		if (resultMessage2==ResultMessage.EXIST) {
			System.out.println("Quit a course success!");
		}
		
		ResultMessage resultMessage3=chooseCourseBLService.setScore(new ChooseCourseVO(), 90);
		if (resultMessage3==ResultMessage.EXIST) {
			System.out.println("Set score success!");
		}
		
		double score=chooseCourseBLService.getScore(new ChooseCourseVO());
		if (score==90) {
			System.out.println("Get score success!");
		}
	}

}
